From 40daa87afb18348f528560c985c6fdfb73b1cec7 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Wed, 16 Aug 2006 16:15:46 +0100 Subject: [PATCH] [LINUX] Update the hvm_op wrapper now that the return value of get_param is in the parameter structure rather than the hypercall return value. Signed-off-by: Steven Smith --- linux-2.6-xen-sparse/include/xen/hvm.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/linux-2.6-xen-sparse/include/xen/hvm.h b/linux-2.6-xen-sparse/include/xen/hvm.h index 25987ffee5..97bb68a329 100644 --- a/linux-2.6-xen-sparse/include/xen/hvm.h +++ b/linux-2.6-xen-sparse/include/xen/hvm.h @@ -8,10 +8,17 @@ static inline unsigned long hvm_get_parameter(int idx) { struct xen_hvm_param xhv; + int r; xhv.domid = DOMID_SELF; xhv.index = idx; - return HYPERVISOR_hvm_op(HVMOP_get_param, &xhv); + r = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv); + if (r < 0) { + printk(KERN_ERR "cannot get hvm parameter %d: %d.\n", + idx, r); + return 0; + } + return xhv.value; } #endif /* XEN_HVM_H__ */ -- 2.30.2